package cn.yr.system.service;


import cn.yr.common.core.domain.dto.SysUserDto;
import cn.yr.common.core.domain.entity.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;
import me.zhyd.oauth.model.AuthUser;

/**
 * @author Lang 1102076808@qq.com
 * @description
 * @date 2020-06-20 08:24
 */

public interface ILoginService extends IService<SysUser> {

	/**
	 * @description 根据账户查找用户
	 * @author Lang
	 * @date 2020/7/18 11:31
	 */
	SysUser getByUsername(String username);

	/**
	 * @description 初始化用户信息
	 * @author Lang
	 * @date 2020/7/18 16:09
	 */
	SysUserDto initUser(SysUser sysUser);

	/**
	 * @description 生成加密密码
	 * @author Lang
	 * @date 2020/7/18 16:07
	 */
	String generatePassword(String passwordText, String salt);

	/**
	 * @description 生成盐
	 * @author Lang
	 * @date 2020/7/18 16:10
	 */
	String generateSalt();

	/**
	 * 通过第三方授权用户uuid获取用户
	 */
	SysUser getUserByUuid(String uuid);

	void addAuthUser(AuthUser authUser);

	void updateUser(Long uid);

}
